import streamlit as st
import time

@st.cache  # This function will be cached
def my_slow_function(arg1: str, arg2: str):
    # Do something really slow in here!
    time.sleep(3)
    return f'{arg1} + {arg2}'

v1 = st.text_input('a')
v2 = st.text_input('b')
v3 = my_slow_function(v1, v2)
st.write(f'v3={v3}')